package cn.gjculture.shopping.api;

import cn.gjculture.shopping.api.controller.SendMessageController;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableTransactionManagement
@SpringBootApplication
@MapperScan(value ={"cn.gjculture.shopping.api.dao"})
@EnableSwagger2
public class Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext configurableApplicationContext= SpringApplication.run(Application.class, args);
        SendMessageController.setApplicationContext(configurableApplicationContext);
    }
}
